#include <windows.h>
#include "graphisme.h"



//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
//%                                Une histoire de graphisme                            %//
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%//
void Color(int couleurDuTexte,int couleurDeFond) // fonction d'affichage de couleurs
{
        HANDLE H = GetStdHandle(STD_OUTPUT_HANDLE);
        SetConsoleTextAttribute(H,couleurDeFond*16+couleurDuTexte);
}

void POS( int x, int y ) // fonction de positionnement du curseur
{ 
	COORD mycoord; 
	mycoord.X	= x; 
	mycoord.Y	= y; 
	SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), mycoord ); 
} 
void box(int row, int col, int high, int wide) //fonction qui trace les cadres
{
     int i,k;
     POS (col,row);
     printf("%c",T_LEFT);
     for (i=1; i<wide-2;i++)
     printf("%c",HZTL);
     printf("%c",T_RIGHT);
     for (i=1;i<=high-2; i++)
     {
         POS(col,row+i);
         printf("%c",VRTL);
         for(k=1;k<wide-2;k++)
         printf("%c",BLANK);
         printf("%c",VRTL);
     }
     POS(col,row+high-1);
     printf("%c",B_LEFT);
     for (i=1; i <wide-2; i++)
     printf("%c",HZTL);
     printf("%c",B_RIGHT);
}



